Field of the Invention
The present invention relates to a calibration memory control method and apparatus of an electronic control unit (ECU) and, more particularly, to a calibration memory control method and apparatus of an ECU capable of expanding calibration memory space using a multipage calibration algorithm in data calibration through a vehicle CAN (controller area network) calibration protocol (CCP).
Discussion of the Related Art
Specifications of mass-produced vehicles even in the same model may differ depending on options and regions, and electronic control units (ECUs) are developed in parallel with the development of actual vehicles. Accordingly, a control program of a vehicle has variables for a large number of control factors to calibrate the difference between an actual vehicle and a simulation. Here, the control factors which are changeable on the control program of the vehicle are called calibration variables.
A vehicle developer performs calibration in developing and testing processes to determine optimized control factors corresponding to various specifications.
Accordingly, the vehicle developer can develop a vehicle having target performance by ultimately determining control factors according to a vehicle model not at an initial stage of development but at a time when the vehicle is actually prepared.
These variables include not only some factors, values of which are definitely determined according to the vehicle model, but also other factors, values of which need to be adjusted and changed during actual operation of the vehicle for optimal values.
An ECU and an external calibration tool use a standard calibration protocol for data which should be calibrated in real time during operation of the vehicle. Representative examples of the calibration protocol include a CAN (controller area network) calibration protocol (CCP) and an extended calibration protocol (XCP).
Numerous control factors or maps are present in an ECU to achieve a variety of target performances during development of the ECU. A communication protocol called CCP is used to find an optimized vehicle performance by changing these data while the vehicle is being driven.
However, if the number of control factors or maps in the ECU is increased, a required memory size is also increased. In many cases, a memory size actually required in a development process is greater than an available memory size and thus calibration cannot be performed.
On the other hand, control program data of a vehicle should be retained even when power is not supplied to the ECU and thus is stored in non-volatile memory, e.g., flash memory. As shown in Table. 1 (Program and RAM Sizes per ECU) of FIG. 1, the ECU has a smaller size of RAM compared to the size of a control program and thus drives the control program of the vehicle from flash memory without loading the same in RAM.
However, the flash memory cannot instantly change a currently stored value, should store a new value after erasing the existing value, and thus is not appropriate to calibrate data in real time.
Accordingly, to freely change the values of control factors, a conventional ECU is designed to copy data of flash memory (a reference page) to a same-sized RAM space (a working page), and to refer to an appropriate page using an address translation function of a microprocessor, as illustrated in FIG. 2.
However, in most cases, an available space of internal RAM of a microprocessor is insufficient to allocate a space corresponding to the size of calibration data to the RAM for a working page. As such, large-capacity external memory for proper calibration is additionally installed for mass-produced ECUs.
In this case, the cost of the ECU is increased. Furthermore, if the size of calibration data is increased during development of the ECU and thus available memory is insufficient, inconvenience of adjusting calibration variables may be caused.
Specifically, if a processor having no external bus is unavoidably used when a microprocessor is selected, the external memory for calibration may not be used.